import Layout from '@/layout'

// 动态路由
export const asyncRoutes = [
  // 工单管理
  {
    path: '/ment',
    component: Layout,
    name: 'ment',
    meta: { title: '工单管理', icon: 'el-icon-document' },
    children: [
      {
        path: '/workMent', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'workMent',
        component: () => import('@/views/WorkMent'),
        meta: { title: '运营工单', icon: 'skill' }
      },
      {
        path: '/workMent/Operation',
        name: 'operation',
        component: () => import('@/views/WorkMent/Operation'),
        meta: { title: '运维工单', icon: 'skill' }
      }
    ]
  },
  // 点位管理
  {
    path: '/pointMent',
    component: Layout,
    meta: { title: '点位管理', icon: 'el-icon-location-information' },
    children: [
      {
        path: '/pointMent/regionalMent',
        name: 'regionalMent',
        component: () => import('@/views/PointMent/RegionalMent'),
        meta: { title: '区域管理', icon: 'skill' }
      },
      {
        path: '/pointMent',
        name: 'PointMent',
        component: () => import('@/views/PointMent/index'),
        meta: { title: '点位管理', icon: 'skill' }
      },
      {
        path: '/pointMent/partnerMent',
        name: 'partnerMent',
        component: () => import('@/views/PointMent/PartnerMent'),
        meta: { title: '合作商管理', icon: 'skill' }
      }
    ]
  },
  // 设备管理
  {
    path: '/deviceMent',
    component: Layout,
    meta: { title: '设备管理', icon: 'el-icon-setting' },
    children: [
      {
        path: '/deviceMent',
        name: 'deviceMent',
        component: () => import('@/views/DeviceMent/index'),
        meta: { title: '设备管理', icon: 'setting' }
      },
      {
        path: '/deviceStatus',
        name: 'deviceStatus',
        component: () => import('@/views/DeviceMent/DeviceStatus'),
        meta: { title: '设备状态', icon: 'setting' }
      },
      {
        path: '/deviceType',
        name: 'deviceType',
        component: () => import('@/views/DeviceMent/DeviceType'),
        meta: { title: '设备类型管理', icon: 'setting' }
      }
    ]
  },
  // 人员管理
  {
    path: '/peopleMemt',
    component: Layout,
    meta: { title: '人员管理', icon: 'el-icon-user' },
    children: [
      {
        path: '/peopleMemt',
        name: 'peopleMemt',
        component: () => import('@/views/PeopleMemt/index'),
        meta: { title: '人员列表', icon: 'people' }
      },
      {
        path: '/humanStatist',
        name: 'humanStatist',
        component: () => import('@/views/PeopleMemt/HumanStatist'),
        meta: { title: '人效统计', icon: 'people' }
      },
      {
        path: '/worklosdList',
        name: 'worklosdList',
        component: () => import('@/views/PeopleMemt/WorklosdList'),
        meta: { title: '工作量列表', icon: 'people' }
      }
    ]
  },
  // 商品管理
  {
    path: '/commodity',
    component: Layout,
    meta: { title: '商品管理', icon: 'el-icon-cpu' },
    children: [
      {
        path: '',
        name: 'commodity',
        component: () => import('@/views/Commodity/index'),
        meta: { title: '商品类型', icon: '' }
      }
      // {
      //   path: '',
      //   name: 'commodity',
      //   component: () => import('@/views/Commodity/index'),
      //   meta: { title: '商品管理', icon: '' }
      // }
    ]
  },
  // 策略管理
  {
    path: '/policyMent',
    component: Layout,
    children: [{
      path: '',
      name: 'policyMent',
      component: () => import('@/views/PolicyMent/index'),
      meta: { title: '策略管理', icon: 'el-icon-magic-stick' }
    }]
  },
  // 订单管理
  {
    path: '/salary',
    component: Layout,
    children: [{
      path: '',
      name: 'salary',
      component: () => import('@/views/Salary/index'),
      meta: { title: '订单管理', icon: 'el-icon-date' }
    }]
  },
  // 对账统计
  {
    path: '/reconciliation',
    component: Layout,
    children: [{
      path: '',
      name: 'reconciliation',
      component: () => import('@/views/Reconciliation/index'),
      meta: { title: '对账统计', icon: 'el-icon-coordinate' }
    }]
  }
]
